package Day3;

import java.util.Scanner;

public class TestCompany {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Company c = new Company();
        c.CompanyName = "强盛集团";
        c.address = "www.gyy.com";
        c.PhoneNumber = "19955389889";
        c.Business = "房屋";
        c.Show();
        System.out.println("现强盛集团开始广聘人才");
        String choose = "";
        while (2 > 1) {
            System.out.print("请输入面试还是看看员工还是老板开除员工：");
            choose = sc.next();
            if (choose.equals("面试")) {
                System.out.println("请输入名字：");
                String name = sc.next();
                int t = c.add(name);
                System.out.println("现"+c.CompanyName+"有"+t+"名员工");
            } else if (choose.equals("开除")) {
                System.out.println("请输入开除者姓名：");
                String ba = sc.next();
                boolean x = c.Delete(ba);
                System.out.println(x ? "下午走人" : "再看看");
            } else if (choose.equals("查看")) {
                c.Info();
            } else if (choose.equals("退出")) {
                break;
            }
        }
        System.out.println("欢迎下次光临强盛集团！");
    }
}
